package www.dashu.com.service;

import www.dashu.com.dao.SysUserAppDao;
import www.dashu.com.domain.SysUserApp;
import www.dashu.com.domain.SysUserRole;
import www.dashu.com.service.base.BaseService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SysUserAppService extends BaseService<SysUserApp,Long, SysUserAppDao>{

    public List<SysUserApp> findUserAppsByUserId(Long userId){
        List<SysUserApp> userApps = dao.findUserAppsByUserId(userId);
        if(null == userApps){
            userApps = new ArrayList<>();
        }
        return userApps;
    }

    public void deleteUserAPpByUserId(Long userId){
        dao.deleteUserAPpByUserId(userId);
    }

}